﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="AccountInfomation_Users_Default" %>

<asp:Content ID="Content3" ContentPlaceHolderID="Stylesheet" Runat="Server">
</asp:Content>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="SubNavigation">
    <ul>
        <li class="first">
            <asp:HyperLink ID="lnkOverview" NavigateUrl="~/account/default.aspx" runat="server">Overview</asp:HyperLink>
        </li>
        <li class="middle">
            <asp:HyperLink ID="lnkAccountInformation" NavigateUrl="~/billing/default.aspx" runat="server">Billing</asp:HyperLink>
        </li>
        <li  class="middle">
            <asp:HyperLink ID="lnkUsers" NavigateUrl="~/users/default.aspx" runat="server">Users</asp:HyperLink>
        </li>
        <li  class="middle">
            <asp:HyperLink ID="lnkNotifications" NavigateUrl="~/notifications/default.aspx" runat="server">Notifications</asp:HyperLink>
        </li>
        <li  class="last">
            <asp:HyperLink ID="lnkYourInfo" NavigateUrl="~/account/yourinformation.aspx" runat="server">Your Info</asp:HyperLink>
        </li>
    </ul>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PageHeader" Runat="Server">
    <asp:Label ID="Label1" runat="server" Font-Size="X-Large" Text="Users"></asp:Label>
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="MainContent" Runat="Server">  
    <div style="width: 70%; float:left; padding-right: 20px;padding-top:10px; border-right:1px solid #C0C0C0;">       
        <asp:DataList ID="dlUsers" runat="server" Width="100%" GridLines="Horizontal" 
            BorderWidth="0px" onitemdatabound="dlUsers_ItemDataBound" CellPadding="0" 
            onitemcommand="dlUsers_ItemCommand">
                <ItemTemplate>
                    <div style="width:100%">
                        <div style="width:70%;float:left;list-style-type:none">                            
                           <ul>
                                <li>
                                    <b> <%# Eval("Username")%> <%# Eval("Role.Name") %></b>
                                </li>
                                <li>
                                    <%# Eval("Name") %>
                                </li>
                                <li>                                    
                                    <a href='mailto: <%# Eval("Email") %>'><%# Eval("Email")%></a>
                                </li>
                                <li>
                                    <%#(!string.IsNullOrEmpty(Convert.ToString(Eval("Phone"))) ? Eval("Phone") : "<< no phone number provided >>")%>
                                </li>
                                <li>
                                    <br />
                                    <%#!Convert.ToBoolean(Eval("IsActived"))?"Additional Information About User <br />Is Disabled":""%>
                                </li>
                            </ul>
                                            
                        </div>
                        <div style="width:30%;float:left;">
                            <asp:LinkButton ID="lkbEditUser" runat="server" CommandName="EditUser">Edit User</asp:LinkButton><br />
                            <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "~/Users/setUserPassword.aspx?u="+Eval("Username") %>'>Change Password</asp:HyperLink><br />                            
                            <asp:LinkButton ID="lbtDelete" runat="server" CommandName="DeleteUser">Delete User</asp:LinkButton>
                        </div>
                    </div>
                </ItemTemplate>
            </asp:DataList>     
    </div>
</asp:Content>

<asp:Content ID="Content6" ContentPlaceHolderID="SideBar" Runat="Server">
    <div align="left" style="width:25%; float:right;padding-left:20px">
        <div>Options</div>
        <hr />
                <asp:LinkButton ID="lbtnAddUser" runat="server" Font-Underline="true" 
                    PostBackUrl="~/Users/addUser.aspx">Add User</asp:LinkButton><br />
                <asp:LinkButton ID="lbtnCustomUser" runat="server" Font-Underline="true" 
                    PostBackUrl="~/Users/customUsers.aspx">Manage Custom Users</asp:LinkButton>
    </div>
</asp:Content>